<form action="index.php?act=cate&op=cate_edit" method="post">
    <input type="hidden" name="cate_id" value="<?php echo $_GET['cate_id']?>" />
<table>
    <tr><td>请选择上级分类：</td><td>
            <select name="p_id">
                <option value="0">顶级分类</option>
                <?php foreach($cate_list as $cate_row){?>
                    <?php if($cate_row['cate_id']==$cate_array['cate_parent_id']){?>
                        <option selected="selected" value="<?php echo $cate_row['cate_id']?>"><?php echo str_repeat('&nbsp;&nbsp;',$cate_row['level']).$cate_row['cate_name']?></option>
                        <?php }else{?>
                        <option value="<?php echo $cate_row['cate_id']?>"><?php echo str_repeat('&nbsp;&nbsp;',$cate_row['level']).$cate_row['cate_name']?></option>
                        <?php }?>

                <?php }?>
            </select>
        </td></tr>
    <tr><td>分类名称：</td><td><input type="text" name="cate_name" value="<?php echo $cate_array['cate_name']?>" /></td></tr>
    <tr><td><input type="submit" name="cate_edit" value="修改" /></td></tr>
</table>
</form>